﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class Lesson18 : MonoBehaviour,IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler
{
    void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData)
    {
        //鼠标进入 在移动设备上 无法触发 因为不存在进入的概念
        Debug.LogFormat("鼠标进入");
    }

    void IPointerExitHandler.OnPointerExit(PointerEventData eventData)
    {
        //鼠标离开  在移动设备上 无法触发 因为不存在离开 的概念
        Debug.LogFormat("鼠标离开");
    }

    void IPointerDownHandler.OnPointerDown(PointerEventData eventData)
    {
        Debug.LogFormat("鼠标(触碰)按下 pointerId:{0} position:{1}", eventData.pointerId, eventData.position);
    }

    void IPointerUpHandler.OnPointerUp(PointerEventData eventData)
    {
        Debug.LogFormat("鼠标(触碰)抬起");
    }
}
